<template>
  <div class="address">
    <van-nav-bar
      title="我的收货地址"
      left-text="返回"
      right-text="新增地址"
      left-arrow
      @click-left="$router.go(-1)"
      @click-right="$router.push('/newaddress')"
    />
    <div class="addlist">
      <div>
        <p>张三</p>
        <p>陕西省西安市</p>
      </div>
      <div>修改</div>
    </div>
    <div class="addlist">
      <div>
        <p>王五</p>
        <p>陕西省咸阳市</p>
      </div>
      <div>修改</div>
    </div>
  </div>
</template>

<script>
import { address_list } from "../../utils/api";
export default {
  data() {
    return {
      addresList: [],
    };
  },
  mounted() {
    address_list().then((res) => {
      console.log(res.data.list);
    });
  },
};
</script>

<style lang="scss" scoped>
.addlist {
  height: 80px;
  margin: 8px 10px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background-color: #ccc;
}
</style>
